'''
Descripttion: 
version: V1.0.0
Author: LeonHe
Date: 2021-10-16 21:56:08
LastEditTime: 2021-10-17 21:49:27
'''

indexList = [1,9,16,22,27,28,23,18,17,19,24,29,30,26,21,14,15]
while len(indexList) > 0:
    # index=int(input("输入index\n"))
    index = indexList.pop(0)

    if index == 1 :

        addr=index - 1 + 0 
        shuma=1

    elif index >= 2 and index <= 8:

        addr=8 - index + 4
        shuma=2

    elif index >= 9 and index <= 11:

        addr=index - 9 + 1
        shuma=1

    elif index >= 12 and index <= 15:

        addr=15 - index + 11
        shuma=3

    elif index >= 16 and index <= 21:

        addr=index - 16 + 23
        shuma=5

    elif index >= 22 and index <= 23:

        addr=23 - index + 21
        shuma=6

    elif index >= 24 and index <= 26:

        addr=index - 24 + 15
        shuma=4

    elif index >= 27 and index <= 28:

        addr=index - 27 + 19
        shuma=5

    elif index == 29:

        addr=index - 29 + 29
        shuma=4

    elif index == 30:

        addr=index - 30 + 18
        shuma=4

    if shuma==1:
        hex="0x10"
    elif shuma==2:
        hex="0x08"
    elif shuma==3:
        hex="0x01"
    elif shuma==4:
        hex="0x80"
    elif shuma==5:
        hex="0x10"
    elif shuma==6:
        hex="0x01"


    print(addr,hex)
